from abc import ABC, abstractmethod
from typing import List

class FileInfo:
    def __init__(self, file_path: str, is_dir: bool) -> None:
        self.file_path = file_path
        self.is_dir = is_dir
    
    def __str__(self) -> str:
        return f"{'dir' if self.is_dir else 'file'} {self.file_path}"
    
    def __repr__(self) -> str:
        return self.__str__()

class CompilationContext(ABC):
    def __init__(self) -> None:
        pass
    
    @abstractmethod
    def init_project(self) -> str:
        raise NotImplementedError(f"Initializing project is not implemented")
    
    @abstractmethod
    def list_files(self) -> List[FileInfo]:
        raise NotImplementedError(f"Listing files is not implemented")
    
    @abstractmethod
    def read_file(self, file_path: str) -> str:
        raise NotImplementedError(f"Reading file is not implemented")
    
    @abstractmethod
    def write_file(self, file_path: str, content: str) -> bool:
        raise NotImplementedError(f"Writing file is not implemented")
    
    @abstractmethod
    def create_file(self, file_path: str) -> bool:
        raise NotImplementedError(f"Creating file is not implemented")
    
    @abstractmethod
    def delete_file(self, file_path: str) -> bool:
        raise NotImplementedError(f"Deleting file is not implemented")
    
    @abstractmethod
    def rename_file(self, old_file_path: str, new_file_path: str) -> bool:
        raise NotImplementedError(f"Renaming file is not implemented")

    @abstractmethod
    def clean(self) -> None:
        raise NotImplementedError(f"Cleaning up is not implemented")

    @abstractmethod
    def compile(self) -> str:
        raise NotImplementedError(f"Compilation is not implemented")

    @abstractmethod
    def run(self) -> str:
        raise NotImplementedError(f"Running code is not implemented")